package com.syl.practice.adapter.dcadapter;

import com.syl.practice.adapter.dc.AC;
import com.syl.practice.adapter.dc.AC220;

/**
 *  中国220V电压适配器
 */
public class ChinaAdapter implements DC5Adapter {

    @Override
    public boolean support(AC ac) {
        return (ac instanceof AC220);
    }

    @Override
    public int outputDC5V(AC ac) {
        int outputAC = ac.outputAC()/44;
        System.out.println("中国220V电压已转换为5V电压");
        return outputAC;
    }
}
